import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		config: {}, 
		redirectPage: '',	
		address:{},
		withdraw:{},
		storeAddress:{}
	},
    mutations: {
		config (state, payload) {
			state.config = payload
		},		
		redirect (state, payload) {
			state.redirectPage = payload.page
		},
		address(state, payload){
			state.address = payload
		},
		storeAddress(state, payload){
			state.storeAddress = payload
		},
		withdraw(state, payload){
			state.withdraw = payload
		},
	},
	actions: {

	},
	getters: {
		shopConfig: state => state.config,
	}
})

export default store